	$(function() {
		 	$("#address").treemenu({ jsondata: treedata, deep: 2 });
			var tableSource = new $.jqx.dataAdapter({
				dataType: "json",
				dataFields:[
				    { name: "id", type: "int" },
				    { name: "account", type: "string" },
				    { name: "nickname", type: "string" },
				    { name: "sex", type: "int" },
				    { name: "cellphone", type: "string" },
				    { name: "head_sculpture", type: "string" },
				    { name: "status", type: "int" }
				],
				id: "id",
				url: "user/all.do",
				data: { status : 0 }
			});
			$("#dataTable").jqxDataTable({
				width: "100%",
		        source: tableSource,
                pageable: true,
                pageSize: 15,
                serverProcessing: true,
                pagerButtonsCount: 10,
		        columnsResize: true,
		        sortable: true,
		        columns: [
		            { text: "序号", width: 50, cellsRenderer: function(row){ return (row + 1).toString(); } },
		            { text: "账户", dataField: "account", width: 120 },
		            { text: "昵称", dataField: "nickname", minWidth: 120 },
		            { text: "性别", dataField: "sex", width: 50, cellsRenderer:function(row, column, value, rowData) { return ["女","男"][value] || "未知" } },
		            { text: "手机号", dataField: "cellphone", width: 120 },
		            { text: "状态", dataField: "status", width: 120, cellsRenderer:function(row, column, value, rowData){return ["正常用户","禁用的用户"][value]} },
		        ],
			});
			$("#dataTable").on("rowDoubleClick",function(info, args) {
				if(args && args.flag){
					info = args;
				}
				editingIndex = info.args.index;
				editingData = info.args.row;
			 	_editerIndex = layer.open({
					id: "userEditer",
					title: "查看用户信息",
				    type: 1,
				    skin: 'layui-layer-rim',
				    area: ['1000px', '680px'],
				    content: 
				    	'<div id="user-editer" class="form" style="height: 100%;overflow: auto;">' +
				    	'<div class="input-box" style="float:left;"><label class="from-label" for="nickname">昵称：</label>' +
				    	'<img name="head_sculpture" class="form-control" style="width:200px;height:200px;"/></div>' +
				    	'<div class="input-box"><label class="from-label" for="userid">UserID：</label>' +
				    	'<input type="text" name="userid" class="form-control" placeholder="UserID" readonly="true" /></div>' +
				    	'<div class="input-box"><label class="from-label" for="nickname">昵称：</label>' +
				    	'<input type="text" name="nickname" class="form-control" placeholder="昵称" readonly="true" /></div>' +
				    	'<div class="input-box"><label class="from-label" for="sex">性别：</label>' +
				    	'<input type="text" name="sex" class="form-control" placeholder="性别" readonly="true" /></div>' +
				    	'<div class="input-box"><label class="from-label" for="cellphone">手机号：</label>' +
				    	'<input type="text" name="cellphone" class="form-control" placeholder="手机号" readonly="true" /></div>' +
				    	'<div class="input-box"><label class="from-label" for="status">状态：</label>' +
				    	'<input type="text" name="status" class="form-control" placeholder="状态" readonly="true" /></div>' +
				    	'<br><br><br>' +
				    	'</div>' +
				    	'<div class="form" style="position: absolute;bottom: 0px;width: 100%;text-align: right;background-color: #DDD;">' +
				    	'<input type="button" class="btn btn-sm btn-info" onclick="closeEditer(this)" value="返回"/>' +
				    	'</div>'
				});
			 	var diplayData = clone(editingData);
			 	diplayData.sex = ["女","男"][diplayData.sex]||"未知";
			 	diplayData.status = ["正常用户","禁用的用户"][diplayData.status];
			 	setData($("#user-editer"), diplayData);
			});
		});